﻿var OtherMgr = {
    qrCode: "sv.other.qrcode",
    getQrcodeImage: function (getQrcodeImageCallback) {
        var qrCode = getStorageVal(OtherMgr.qrCode);
        if (null == qrCode) {
            doAjax(null, "get_qr_code", function (msg) {
                setStorage(OtherMgr.qrCode, msg.qr_code_url);
                if (null != getQrcodeImageCallback) {
                    getQrcodeImageCallback(msg.qr_code_url);
                }
            });
        } else {
            if (null != getQrcodeImageCallback) {
                getQrcodeImageCallback(qrCode);
            }
        }
    },
    sendFeedback: function (content, contact) {
        var feedbackJson = { 'suggestion': content, 'contacts': contact }
        doAjax(feedbackJson, "report_suggestion", function () {
        });
    },
};